<!DOCTYPE html>
<!--FILE VERSION 2.1.0 FORMAT-->
<!--CSS VERSION 1.0.1 FORMAT-->
<html lang="zh-CN">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Gitee 人机认证</title>
  <meta content="noindex, nofollow" name="robots">
  <meta content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1.0, user-scalable=no"
    name="viewport">
  <link rel="stylesheet" media="all" href="./test_files/temp.css">
</head>

<body>
  <div class="gitee-external-link-wrapper">
    <img class="logo-img" src="./test_files/logo-black.svg" alt="Logo black">
    <div class="content-box">
      <div class="content-title">人机验证</div>
      <div class="content-text">
        您将要访问的链接出现了外链滥用现象，请先完成人机验证。
      </div>
      <div class="content-text" id="check"></div>
      <div class="ui button orange external-link-btn checkbtn">开始验证</div>
    </div>
  </div>
  <script>
    let check = document.getElementsByClassName("checkbtn")[0];
    let a = Math.floor(Math.random() * 10)
    let b = Math.floor(Math.random() * 10)
    let c = a + b;
    let checkElement = document.getElementById("check")
    check.onclick = function () {
      if (check.innerHTML == "开始验证") {
        checkElement.innerHTML = a + "+" + b + "=?";
        check.innerHTML = "开始作答";
      }
      else if (check.innerHTML == "开始作答") {
        checkElement.innerHTML = "<input id='init'></input>";
        check.innerHTML = "完成作答";
      }
      else if (check.innerHTML == "完成作答") {
        let sum = document.getElementById("init")
        sum = sum.value;
        if (sum == c) {
          checkElement.innerHTML = "验证成功!"
          check.innerHTML = "跳转"
        }
        else {
          checkElement.innerHTML = "验证失败!请重试!"
          check.innerHTML = "开始验证"
        }
      }
      else {
        window.location.href = "./test_files/google_check.html";
      }
    }
  </script>
</body>

</html>